﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace HySoft.Cash.Structure.HySoft.Cash.Structure
{
    public class TStatementInvoiceDT
    {
        public static TStatementInvoiceDT ConvertFrom(IDataReader reader)
        {
            TStatementInvoiceDT entity = new TStatementInvoiceDT();
            if (reader != null)
            {
                entity.ID = Convert.ToInt32(reader["ID"]);
                entity.StatementGuid = new Guid(Convert.ToString(reader["StatementGuid"]));
                entity.Guid = new Guid(Convert.ToString(reader["Guid"]));;
                entity.OriginalInvoiceID = Convert.ToInt32(reader["OriginalInvoiceID"]);;
                entity.OriginalInvoiceGuid = Convert.ToString(reader["OriginalInvoiceGuid"]);
                entity.OrgSid = Convert.ToInt32(reader["OrgSid"]);;
                entity.InvoiceDate = Convert.ToDateTime(reader["InvoiceDate"]);
                entity.Principal = Convert.ToDecimal(reader["Principal"]);
                entity.Interest = Convert.ToDecimal(reader["Interest"]);
                entity.Penalty = Convert.ToDecimal(reader["Penalty"]);
                entity.LateInterestCharges = Convert.ToDecimal(reader["LateInterestCharges"]);
                entity.State = Convert.ToInt32(reader["State"]);
                entity.Note = Convert.ToString(reader["Note"]);
                entity.PrincipalPaid = Convert.ToDecimal(reader["PrincipalPaid"]);
                entity.InterestPaid = Convert.ToDecimal(reader["InterestPaid"]);
                entity.PenaltyPaid = Convert.ToDecimal(reader["PenaltyPaid"]);
                entity.LateInterestChargesPaid = Convert.ToDecimal(reader["LateInterestChargesPaid"]);
            }

            return entity;
        }

        private int id;
        private System.Guid statementguid;
        private System.Guid guid;
        private int originalinvoiceid;
        private string originalinvoiceguid;
        private int orgsid;
        private System.DateTime invoicedate;
        private decimal principal;
        private decimal interest;
        private decimal penalty;
        private decimal lateinterestcharges;
        private int state;
        private string note;
        private decimal principalpaid;
        private decimal interestpaid;
        private decimal penaltypaid;
        private decimal lateinterestchargespaid;

        /// <summary>
        /// 
        /// </summary>
        public int ID
        {
            set { id = value; }
            get { return id; }
        }
        /// <summary>
        /// 
        /// </summary>
        public System.Guid StatementGuid
        {
            set { statementguid = value; }
            get { return statementguid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public System.Guid Guid
        {
            set { guid = value; }
            get { return guid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int OriginalInvoiceID
        {
            set { originalinvoiceid = value; }
            get { return originalinvoiceid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string OriginalInvoiceGuid
        {
            set { originalinvoiceguid = value; }
            get { return originalinvoiceguid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int OrgSid
        {
            set { orgsid = value; }
            get { return orgsid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public System.DateTime InvoiceDate
        {
            set { invoicedate = value; }
            get { return invoicedate; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal Principal
        {
            set { principal = value; }
            get { return principal; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal Interest
        {
            set { interest = value; }
            get { return interest; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal Penalty
        {
            set { penalty = value; }
            get { return penalty; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal LateInterestCharges
        {
            set { lateinterestcharges = value; }
            get { return lateinterestcharges; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int State
        {
            set { state = value; }
            get { return state; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string Note
        {
            set { note = value; }
            get { return note; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal PrincipalPaid
        {
            set { principalpaid = value; }
            get { return principalpaid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal InterestPaid
        {
            set { interestpaid = value; }
            get { return interestpaid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal PenaltyPaid
        {
            set { penaltypaid = value; }
            get { return penaltypaid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal LateInterestChargesPaid
        {
            set { lateinterestchargespaid = value; }
            get { return lateinterestchargespaid; }
        }      
    }
}
